﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleLinearDistance
{
    class Program
    {
        static void Main(string[] args)
        {
            double x1, x2, y1, y2;
            double distance;

            Console.WriteLine("Please, input first coordinate at X axes (x1):");
            x1 = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Please, input first coordinate at Y axes (y1):");
            y1 = Convert.ToDouble(Console.ReadLine());


            Console.WriteLine("Please, input second coordinate at X axes (x2):");
            x2 = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Please, input second coordinate at Y axes (y2):");
            y2 = Convert.ToDouble(Console.ReadLine());

            distance = Math.Sqrt(Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2));

            Console.WriteLine("Press Enter to view distance from "+ x1 +"," + y1 + " to " + x2 + "," + y2 + ": ");
            Console.ReadLine();
            Console.WriteLine("Distance is: " + distance);
        }
    }
}
